package com.example.dwr.gidemo;

import java.util.ArrayList;
import java.util.List;
import java.util.Random;

public class Corporations
{
  private Random random = new Random();
  private List<Corporation> corporations = new ArrayList();

  public Corporations()
  {
    this.corporations.add(new Corporation("BAYC", "Bay Corporation"));
    this.corporations.add(new Corporation("VIRT", "Virtualis"));
    this.corporations.add(new Corporation("MGSF", "Megasoft Co."));
    this.corporations.add(new Corporation("MAXI", "Maximegalon Ind."));
    this.corporations.add(new Corporation("RIGL", "Rigel Cybernetics"));
    this.corporations.add(new Corporation("TRTR", "Tretrigintillion"));
    this.corporations.add(new Corporation("CONC", "Concor PLC"));
    this.corporations.add(new Corporation("HYPS", "Hypersoft"));
  }

  public List<Corporation> getCorporations()
  {
    return this.corporations;
  }

  public Corporation getNextChangedCorporation()
  {
    Corporation corporation = (Corporation)this.corporations.get(this.random.nextInt(this.corporations.size()));
    corporation.change();

    return corporation;
  }
}